import os
from loguru import logger
from utils.basic_utils import get_pro_path

file_name = 'api.log'
log_file = os.path.join(get_pro_path('log') ,file_name)      # 获取到的是整个路径
logger.info("log_file:" ,log_file)
logger.add(
    log_file,
    level='INFO',
    rotation='100MB',
    compression='zip'
)